package org.lojzes.minstruts.demo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lojzes.minstruts.form.AbstractForm;
import org.lojzes.minstruts.action.Action;

public class StudentAction implements Action{

	@Override
	public String execute(HttpServletRequest request, HttpServletResponse httpServletResponse, AbstractForm form) {
		StudentForm  sForm = (StudentForm)form;
		String url="";
		if(sForm.getName().equals("lyy")&&sForm.getAddress().equals("123")){
			url="success";
		}else{
			url="failed";
		}
		return url;
	}

}
